Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

walk-sync-matcher

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

walk-sync-matcher

Get an array of recursive directory contents

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-walk-sync

Build Status

Return an array containing all recursive files and directories under a given directory, similar to Unix find. Follows symlinks. Bare-bones, but very fast.

Similar to wrench.readdirSyncRecursive, but adds trailing slashes to directories.

Not to be confused with node-walk, which has both an asynchronous and a synchronous API.

Installation

npm install --save walk-sync

Usage

var walkSync = require('walk-sync');
var paths = walkSync('foo')

Given foo/one.txt and foo/subdir/two.txt, paths will be the following array:

['one.txt', 'subdir/', 'subdir/two.txt']

Note that directories come before their contents, and have a trailing slash.

Symlinks are followed.

Background

walkSync(baseDir) is a faster substitute for

glob.sync('**', {
  cwd: baseDir,
  dot: true,
  mark: true,
  strict: true
})

FAQs

Package last updated on 10 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc